package com.example.adapter.demo.login.v1.adapters;

import com.example.adapter.demo.login.v1.Member;
import com.example.adapter.demo.login.v1.ResultMsg;

/**
 * Token 登录
 */
public class LoginForTokenAdapter implements LoginAdapter {


    @Override
    public boolean support(Object loginAdapter) {
        return loginAdapter instanceof LoginForTokenAdapter;
    }

    @Override
    public ResultMsg login(String id ) {
        Member member = new Member();
        member.setToken(id);
        ResultMsg resultMsg = new ResultMsg(200, "token登录成功", member);
        return resultMsg;
    }
}
